package com.lotusfall.controller;

import com.lotusfall.pojo.User;
import com.lotusfall.service.UserService;
import com.lotusfall.service.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * 界面层
 */
@Controller
public class UserController {
    public UserService getUserService() {
        return userService;
    }

    public void setUserService(UserService userService) {
        this.userService = userService;
    }

    // 所有的界面层都会有业务逻辑层的对象
    @Autowired
    private UserService userService;

    // 界面层的功能实现，对外提供访问的功能
    public int insert(User user){
        return userService.insert(user);
    }
}
